//
//  ZhuyeView.m
//  mid-view
//
//  Created by sus183 on 2020/12/2.
//  Copyright © 2020 itlab. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "ZhuyeView.h"

@implementation ZhuyeView
-(void)drawRect:(CGRect)rect{
    /*
    [super drawRect:rect];
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);
    
    // Draw them with a 2.0 stroke width so they are a bit more visible.
    CGContextSetLineWidth(context, 2.0f);
    
    CGContextMoveToPoint(context, 0.0f, 0.0f); //start at this point
    
    CGContextAddLineToPoint(context, 20.0f, 20.0f); //draw to this point
    
    // and now draw the Path!
    CGContextStrokePath(context);
     */
    CGFloat screenWidth = [[UIScreen mainScreen]bounds].size.width;
    CGContextRef context = UIGraphicsGetCurrentContext();
    
    CGContextSetStrokeColorWithColor(context, [[UIColor blackColor] CGColor]);
    CGContextSetLineWidth(context, 2.0);
    CGContextMoveToPoint(context, 0.0, 100.0);
    CGContextAddLineToPoint(context, screenWidth, 100.0);
    CGContextDrawPath(context, kCGPathStroke);
    
    CGContextSetStrokeColorWithColor(context, [[UIColor blackColor] CGColor]);
    CGContextSetLineWidth(context, 2.0);
    CGContextMoveToPoint(context, 0.0, 160.0);
    CGContextAddLineToPoint(context, screenWidth, 160.0);
    CGContextDrawPath(context, kCGPathStroke);

}
@end
